3.102 \(\int \frac {\cos ^4(a+b \log (c x^n))}{x} \, dx\)

Optimal. Leaf size=73 \[ \frac {\sin \left (a+b \log \left (c x^n\right )\right ) \cos ^3\left (a+b \log \left (c x^n\right )\right )}{4 b n}+\frac {3 \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{8 b n}+\frac {3 \log (x)}{8} \]

[Out]

3/8*ln(x)+3/8*cos(a+b*ln(c*x^n))*sin(a+b*ln(c*x^n))/b/n+1/4*cos(a+b*ln(c*x^n))^3*sin(a+b*ln(c*x^n))/b/n

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2635, 8} \[ \frac {\sin \left (a+b \log \left (c x^n\right )\right ) \cos ^3\left (a+b \log \left (c x^n\right )\right )}{4 b n}+\frac {3 \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{8 b n}+\frac {3 \log (x)}{8} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*Log[c*x^n]]^4/x,x]

[Out]

(3*Log[x])/8 + (3*Cos[a + b*Log[c*x^n]]*Sin[a + b*Log[c*x^n]])/(8*b*n) + (Cos[a + b*Log[c*x^n]]^3*Sin[a + b*Lo
g[c*x^n]])/(4*b*n)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rubi steps

\begin {align*} \int \frac {\cos ^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx &=\frac {\operatorname {Subst}\left (\int \cos ^4(a+b x) \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=\frac {\cos ^3\left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{4 b n}+\frac {3 \operatorname {Subst}\left (\int \cos ^2(a+b x) \, dx,x,\log \left (c x^n\right )\right )}{4 n}\\ &=\frac {3 \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{8 b n}+\frac {\cos ^3\left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{4 b n}+\frac {3 \operatorname {Subst}\left (\int 1 \, dx,x,\log \left (c x^n\right )\right )}{8 n}\\ &=\frac {3 \log (x)}{8}+\frac {3 \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{8 b n}+\frac {\cos ^3\left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{4 b n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 51, normalized size = 0.70 \[ \frac {12 \left (a+b \log \left (c x^n\right )\right )+8 \sin \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+\sin \left (4 \left (a+b \log \left (c x^n\right )\right )\right )}{32 b n} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*Log[c*x^n]]^4/x,x]

[Out]

(12*(a + b*Log[c*x^n]) + 8*Sin[2*(a + b*Log[c*x^n])] + Sin[4*(a + b*Log[c*x^n])])/(32*b*n)

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 59, normalized size = 0.81 \[ \frac {3 \, b n \log \relax (x) + {\left (2 \, \cos \left (b n \log \relax (x) + b \log \relax (c) + a\right )^{3} + 3 \, \cos \left (b n \log \relax (x) + b \log \relax (c) + a\right )\right )} \sin \left (b n \log \relax (x) + b \log \relax (c) + a\right )}{8 \, b n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*log(c*x^n))^4/x,x, algorithm="fricas")

[Out]

1/8*(3*b*n*log(x) + (2*cos(b*n*log(x) + b*log(c) + a)^3 + 3*cos(b*n*log(x) + b*log(c) + a))*sin(b*n*log(x) + b
*log(c) + a))/(b*n)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (b \log \left (c x^{n}\right ) + a\right )^{4}}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*log(c*x^n))^4/x,x, algorithm="giac")

[Out]

integrate(cos(b*log(c*x^n) + a)^4/x, x)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 84, normalized size = 1.15 \[ \frac {\left (\cos ^{3}\left (a +b \ln \left (c \,x^{n}\right )\right )\right ) \sin \left (a +b \ln \left (c \,x^{n}\right )\right )}{4 b n}+\frac {3 \cos \left (a +b \ln \left (c \,x^{n}\right )\right ) \sin \left (a +b \ln \left (c \,x^{n}\right )\right )}{8 b n}+\frac {3 \ln \left (c \,x^{n}\right )}{8 n}+\frac {3 a}{8 b n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a+b*ln(c*x^n))^4/x,x)

[Out]

1/4*cos(a+b*ln(c*x^n))^3*sin(a+b*ln(c*x^n))/b/n+3/8*cos(a+b*ln(c*x^n))*sin(a+b*ln(c*x^n))/b/n+3/8/n*ln(c*x^n)+
3/8/b/n*a

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 93, normalized size = 1.27 \[ \frac {12 \, b n \log \relax (x) + \cos \left (4 \, b \log \left (x^{n}\right ) + 4 \, a\right ) \sin \left (4 \, b \log \relax (c)\right ) + 8 \, \cos \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) \sin \left (2 \, b \log \relax (c)\right ) + \cos \left (4 \, b \log \relax (c)\right ) \sin \left (4 \, b \log \left (x^{n}\right ) + 4 \, a\right ) + 8 \, \cos \left (2 \, b \log \relax (c)\right ) \sin \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )}{32 \, b n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*log(c*x^n))^4/x,x, algorithm="maxima")

[Out]

1/32*(12*b*n*log(x) + cos(4*b*log(x^n) + 4*a)*sin(4*b*log(c)) + 8*cos(2*b*log(x^n) + 2*a)*sin(2*b*log(c)) + co
s(4*b*log(c))*sin(4*b*log(x^n) + 4*a) + 8*cos(2*b*log(c))*sin(2*b*log(x^n) + 2*a))/(b*n)

________________________________________________________________________________________

mupad [B]  time = 2.55, size = 50, normalized size = 0.68 \[ \frac {3\,\ln \left (x^n\right )}{8\,n}+\frac {\frac {\sin \left (2\,a+2\,b\,\ln \left (c\,x^n\right )\right )}{4}+\frac {\sin \left (4\,a+4\,b\,\ln \left (c\,x^n\right )\right )}{32}}{b\,n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*log(c*x^n))^4/x,x)

[Out]

(3*log(x^n))/(8*n) + (sin(2*a + 2*b*log(c*x^n))/4 + sin(4*a + 4*b*log(c*x^n))/32)/(b*n)

________________________________________________________________________________________

sympy [A]  time = 15.35, size = 110, normalized size = 1.51 \[ \frac {\begin {cases} \log {\relax (x )} \cos {\left (2 a \right )} & \text {for}\: b = 0 \wedge \left (b = 0 \vee n = 0\right ) \\\log {\relax (x )} \cos {\left (2 a + 2 b \log {\relax (c )} \right )} & \text {for}\: n = 0 \\\frac {\sin {\left (2 a + 2 b n \log {\relax (x )} + 2 b \log {\relax (c )} \right )}}{2 b n} & \text {otherwise} \end {cases}}{2} + \frac {\begin {cases} \log {\relax (x )} \cos {\left (4 a \right )} & \text {for}\: b = 0 \wedge \left (b = 0 \vee n = 0\right ) \\\log {\relax (x )} \cos {\left (4 a + 4 b \log {\relax (c )} \right )} & \text {for}\: n = 0 \\\frac {\sin {\left (4 a + 4 b n \log {\relax (x )} + 4 b \log {\relax (c )} \right )}}{4 b n} & \text {otherwise} \end {cases}}{8} + \frac {3 \log {\relax (x )}}{8} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*ln(c*x**n))**4/x,x)

[Out]

Piecewise((log(x)*cos(2*a), Eq(b, 0) & (Eq(b, 0) | Eq(n, 0))), (log(x)*cos(2*a + 2*b*log(c)), Eq(n, 0)), (sin(
2*a + 2*b*n*log(x) + 2*b*log(c))/(2*b*n), True))/2 + Piecewise((log(x)*cos(4*a), Eq(b, 0) & (Eq(b, 0) | Eq(n,
0))), (log(x)*cos(4*a + 4*b*log(c)), Eq(n, 0)), (sin(4*a + 4*b*n*log(x) + 4*b*log(c))/(4*b*n), True))/8 + 3*lo
g(x)/8

________________________________________________________________________________________